package com.example.springboot_test.easyexcel.model.builder.common;

import com.example.springboot_test.easyexcel.model.common.FontModel;
import lombok.Getter;

/**
 * 字体信息Builder
 *
 * @author xudongmaster
 */
@Getter
public class FontModelBuilder {
    /**
     * 字体名称
     */
    private String fontName;
    /**
     * 字体大小
     */
    private Double fontHeight;
    /**
     * 字体颜色
     */
    private Object fontColor;
    /**
     * 字体加粗
     */
    private Boolean fontBold;
    /**
     * 字体斜体
     */
    private Boolean fontItalic;
    /**
     * 字体下划线
     */
    private Byte fontUnderLine;
    /**
     * 字体上标下标
     */
    private Short fontTypeOffset;
    /**
     * 字体删除线
     */
    private Boolean fontStrikeout;

    public FontModelBuilder() {
    }

    public FontModelBuilder fontName(String fontName) {
        this.fontName = fontName;
        return this;
    }

    public FontModelBuilder fontHeight(Double fontHeight) {
        this.fontHeight = fontHeight;
        return this;
    }

    public FontModelBuilder fontColor(Object fontColor) {
        this.fontColor = fontColor;
        return this;
    }

    public FontModelBuilder fontBold(Boolean fontBold) {
        this.fontBold = fontBold;
        return this;
    }

    public FontModelBuilder fontItalic(Boolean fontItalic) {
        this.fontItalic = fontItalic;
        return this;
    }

    public FontModelBuilder fontUnderLine(Byte fontUnderLine) {
        this.fontUnderLine = fontUnderLine;
        return this;
    }

    public FontModelBuilder fontTypeOffset(Short fontTypeOffset) {
        this.fontTypeOffset = fontTypeOffset;
        return this;
    }

    public FontModelBuilder fontStrikeout(Boolean fontStrikeout) {
        this.fontStrikeout = fontStrikeout;
        return this;
    }

    /**
     * 具体构建方法
     *
     * @return
     */
    public FontModel build(){
        return new FontModel(this);
    }
}
